import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: () => import('../components/login/Login.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../components/login/Login.vue')
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/home/Home.vue'),
    children: [
      {
        path: '/home',
        name: 'fee',
        component: () => import('../views/Shouye.vue')
      },
      {
        path: '/home/fee',
        name: 'fee',
        component: () => import('../views/home/Fee.vue')
      },
      {
        path: '/home/userinfo',
        name: 'fee',
        component: () => import('../views/home/Userinfo.vue')
      },
      {
        path: '/home/Repairs',
        name: 'fee',
        component: () => import('../views/home/Repairs.vue')
      },
      {
        path: '/home/questions',
        name: 'fee',
        component: () => import('../views/home/Questions.vue')
      },
      {
        path: '/home/Staffs',
        name: 'fee',
        component: () => import('../views/home/Staffs.vue')
      },
      {
        path: '/home/News',
        name: 'fee',
        component: () => import('../views/home/News.vue')
      },
      {
        path: '/home/Stores',
        name: 'fee',
        component: () => import('../views/home/Stores.vue')
      },
      {
        path: '/home/Advertisement',
        name: 'fee',
        component: () => import('../views/home/Advertisement.vue')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
